# -*- coding:utf-8 -*-
import logging

from ihome import redis_story
# import  ihome.redis_story
from flask import current_app
from . import  api
#
@api.route('/index', methods=["GET", "POST"])
def index():
    # session.permanent = True
    # session["sunke"] = "sb"
    # redis_story.set("name1","sunkedashabi")
    # b = 1 / 0
    logging.debug("This is a debug log.")
    logging.info("This is a info log.")
    logging.warning("This is a warning log.")
    logging.error("This is a error log.")
    logging.critical("This is a critical log.")
    # current_app.logger.debug("测试：" + b)
    # current_app.logger.debug()

    current_app.logger.debug("qj")
    current_app.logger.info("INFO LOG")
    current_app.logger.warn("WARN LOG")
    current_app.logger.error("ERROR LOG")
    current_app.logger.fatal("FATAL LOG")

    return 'Hello World'




